﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/admin.master" AutoEventWireup="true"
    CodeFile="product-review-edit.aspx.cs" Inherits="admin_product_review_edit" %>

<%@ Register Namespace="ECommerce.Library.Web" TagPrefix="ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="AdminHeaderContent" runat="Server">
  <link href="<%= SiteGlobals.BaseUrl %>thirdparty/rateit/rateit.css" rel="stylesheet" type="text/css" />
    <script src="<%= SiteGlobals.BaseUrl %>javascript/jquery.min.js" type="text/javascript"></script>
    <script src="<%= SiteGlobals.BaseUrl %>thirdparty/rateit/jquery.rateit.js" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $("#rateit_prod").attr("data-rateit-value", $('.my-rate').val());
        
    });
    function SetRateVal() {
        $('.my-rate').val($('#rateit_prod').rateit('value'));
    }
</script> 
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphMiddleContent" runat="Server">
  
    <div class="admin-function-top inline">
        <ucc:ResponseMessage ID="uccResponseMessage" runat="server"></ucc:ResponseMessage>
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true"
            DisplayMode="BulletList" ShowMessageBox="true" HeaderText="Please correct the following:"
            CssClass="adminValidator" />
        <label>
            Product:</label>
        <asp:TextBox ID="txtProductName" runat="server" ReadOnly="true" CssClass="text" />
        <br />
        <label>
            Customer Name:</label>
        <asp:TextBox ID="txtCustomerName" runat="server" CssClass="text" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCustomerName"
            ErrorMessage="Customer name is required" Display="dynamic" SetFocusOnError="true">
        </asp:RequiredFieldValidator>
        <br />
        <label>
            Customer Email:</label>
        <asp:TextBox ID="txtCustomerEmail" runat="server" CssClass="text" />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtCustomerEmail"
            ErrorMessage="Customer email is required" Display="dynamic" SetFocusOnError="true">
        </asp:RequiredFieldValidator>
        <br />
        <label>
            Rating:</label>
        <input type="range" min="0" max="5" value="4" step="0.5" id="backing2">
<div class="rateit" data-rateit-backingfld="#backing2" data-rateit-resetable="false" id="rateit_prod"></div>
    <input id="hidRate" type="hidden" runat="server" class="my-rate" />
        <br />
        <label>
            Comment:</label>
        <br />
        <asp:TextBox ID="txtComment" runat="server" CssClass="text" TextMode="MultiLine" />
        <br />
        <label>
            Approved:</label>
        <asp:CheckBox ID="chkApproved" runat="server" />
        <div class="btn-place-holder">
            <asp:Button ID="btnSave" runat="server" CssClass="button medium black" Text="Update" OnClick="btnSave_Click" OnClientClick="javascript:SetRateVal();">
            </asp:Button>
        </div>
        <br class="clear" />
    </div>
    <br class="clear" />
</asp:Content>
